import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router";

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(import.meta.env.BASE_URL), //hash
  routes: [
    // {
    //   path: "/redirect",
    //   component: Layout,
    //   children: [
    //     {
    //       path: "/redirect/:path(.*)",
    //       component: () => import("@/views/redirect"),
    //     },
    //   ],
    // },
    {
      path: "",
      component: () => import("@/views/index.vue"),
      redirect: "login",
    },
    {
      path: "/login",
      component: () => import("@/views/login.vue"),
    },
    {
      path: "/index",
      component: () => import("@/views/index.vue"),
    },
    {
      path: "/aboutUs",
      component: () => import("@/views/aboutUs.vue"),
    },
  ],
});

export default router;
